from selenium.webdriver.support.wait import WebDriverWait

from utils import UtilsDriver


class AppBasePage:
    def __init__(self):
        self.driver = UtilsDriver.get_app_driver()

    def get_element(self, location):
        wait = WebDriverWait(self.driver, 10, 1).until(lambda x: x.find_element(*location))
        return wait


class AppBaseHandle:
    def input_text(self, element, text):
        element.clear()
        element.send_keys(text)


